import request from '@/utils/request';
const getLogin = async (data) => {
  const url = $globalRequestUrl({
    url: '/auth/login',
  });
  return await request({
    url,
    method: 'post',
    data,
  })
};
const getEmailCode = async (data) => {
  const url = $globalRequestUrl({
    url: '/auth/email',
  });
  return await request({
    url,
    method: 'post',
    data,
  })
};
const getRegister = async (data) => {
  const url = $globalRequestUrl({
    url: '/auth/register',
  });
  return await request({
    url,
    method: 'post',
    data,
  })
};

const checkEmail = async (email) => {
  const url = $globalRequestUrl({
    url: `/auth/check?email=${email}`,
  });
  return await request({
    url,
    method: 'get',
  })
}
export { getLogin, getEmailCode, getRegister, checkEmail };
